<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="navegacion" name="navegacion">
		<div id="navegacion">
		<link rel="stylesheet" href="Scripts/menu.css" />
		<div class="titulo">Menu</div>
		<div class="usuario"><xsl:value-of select="//navegacion/@usuario"/></div>
		<div id="items-navegacion">
		<script language="JavaScript" src="Scripts/menu.js"></script>
		<script language="JavaScript">
			var MENU_ITEMS = [
			<xsl:for-each select="//navegacion/seccion">
				<xsl:if test="count(enlace/ver[@nivel &lt;= //navegacion/@nivel]) &gt; 0">
					<xsl:if test="position() &gt; 1">
						,
					</xsl:if>
					[&quot;<xsl:value-of select="@texto"/>&quot;, null, null
					<xsl:for-each select="enlace">				
						<xsl:if test="number(ver/@nivel) &lt;= number(//navegacion/@nivel)">
						,[&quot;<xsl:value-of select="@texto"/>&quot;, &quot;<xsl:value-of select="@enlace" />&quot;]							
						</xsl:if>
					</xsl:for-each>
					]
				</xsl:if>
			</xsl:for-each>
			];
		</script>
		<script language="JavaScript" src="Scripts/menu_tpl.js"></script>
		<script language="JavaScript">new menu (MENU_ITEMS, MENU_POS);</script>
		</div>
		</div>
	</xsl:template>
	
</xsl:stylesheet>